

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;

namespace DataLayer
{
	public class datClickThroughs
	{
		public datClickThroughs()
		{
		}
		
		#region  Code Factory Generated Methods
		
		public void InsertClickThroughs(entClickThroughs parEntClickThroughs, DbConnector parDbConnector)
		{
			DbParamCollection insDbParamCollection = new DbParamCollection();
			insDbParamCollection.Add("@pClickThroughAddress",parEntClickThroughs.ClickThroughAddress);
			insDbParamCollection.Add("@pReferrerId",parEntClickThroughs.ReferrerId);
			insDbParamCollection.AddOutput("@pClickThroughId",DbType.Int32);
			parDbConnector.ExecuteNonQuery("InsertClickThroughs",insDbParamCollection);
			parEntClickThroughs.ClickThroughId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
		}
		
		#endregion
        public DataTable ReportClickThroughsMain(DateTime parStartDate, DateTime parEndDate, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pStartDate", parStartDate);
            insDbParamCollection.Add("@pEndDate", parEndDate);
            return parDbConnector.ExecuteDataTable("ReportClickThroughsMain", insDbParamCollection);
        }
        public DataTable ReportClickThroughsDetail(DateTime parStartDate, DateTime parEndDate, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pStartDate", parStartDate);
            insDbParamCollection.Add("@pEndDate", parEndDate);
            return parDbConnector.ExecuteDataTable("ReportClickThroughsDetail", insDbParamCollection);
        }
	}
}